/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package matching;

import matching.triple.ClassTriple;
import ontology.Ontology;
import matching.xml.MatchElements;
import matching.xml.MatchTypes;
import matching.xml.MatchingXML;
import org.jdom.Attribute;
import org.jdom.Element;

/**
 *
 * @author livia
 */
public class ClassMatch extends Match {

     public ClassMatch(ClassTriple source, ClassTriple target,  Ontology ontoSrc, Ontology ontoTgt) {
        this.source = source;
        this.target = target;
        this.ontoSrc = ontoSrc;
        this.ontoTgt = ontoTgt;
    }

     public Element toElementXML(){
        Element match = new Element("match");
        match.setAttribute(new Attribute( MatchElements.type, MatchTypes.classMatch, MatchingXML.uriXmlns));
        Element src = source.toElementXML("source");
        Element tgt = target.toElementXML("target");
        match.addContent(src);
        match.addContent(tgt);
        return match;
    }
}
